<template>
  <div class="persona">
    <SelectTheRegion v-if="props.itemData.id == draggableItem.id" @delItem="delItem"></SelectTheRegion>
    <div class="persona-worp">
      <div class="persona-box"></div>
      <div class="persona-box"></div>
      <div class="persona-box"></div>
      <div class="persona-box"></div>
    </div>
  </div>
</template>

<script setup lang="ts">
import SelectTheRegion from '@/pages/lowCode/components/lowCodeAdd/lowCodeContent/selectTheRegion/index.vue';
import { storeToRefs } from 'pinia';
import { lowCode } from '@/store/modules/lowCode';
const lowCodeStore = lowCode();
const { draggableItem } = storeToRefs(lowCodeStore);
const props: any = defineProps({
  itemData: {
    type: Object,
    default: [],
  },
  del: {
    type: Function, // 假设 del 是一个函数类型的 prop
  },
});
const delItem = () => {
  props.del(props.itemData);
};
</script>

<style lang="scss" scoped>
.persona {
  width: 100%;
  // height: 200px;
  display: inline-block;
  position: relative;
  overflow: hidden;

  .persona-worp {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    // padding: 5px 0px;
    .persona-box {
      width: 250px;
      height: 330px;
      background-color: red;
      border-radius: 10px;
    }
  }
}
// Your scoped styles here
</style>
